<script setup lang="ts">
    import {ref} from 'vue'
    import Child from '@/pages/05-$attrs/Child.vue'

    //希望将这个值传给孙组件
    let username = ref('tom')
    let dog = ref('泰迪')

    function changeUsername(v: string){
        username.value = v
    }
</script>
<template>
    <h1>$Attrs-父组件-{{username}}-{{ dog }}</h1>
    <hr>
    <Child :username="username" :dog="dog" :changeUsername ='changeUsername'/>
</template>
<style scoped>
   
</style>